package com.heu.blood.recycle.controller;

import com.heu.blood.common.aop.ControllerLogAnnotation;
import com.heu.blood.common.utils.R;
import com.heu.blood.recycle.entity.BloodTrackBo;
import com.heu.blood.recycle.service.BloodTrackBoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("recycle/bloodtrackbo")
public class BloodTrackBoController {

    @Autowired
    private BloodTrackBoService bloodTrackBoService;

    /**
     * 通过血液id查找血液相关信息
     * @param bloodId
     * @return
     */
    @RequestMapping("query")
    @ControllerLogAnnotation(module = "血液追踪", operate = "通过血液Id查找血液所有相关信息")
    public R query(String bloodId){

        return R.ok().setData(bloodTrackBoService.query(bloodId));
    }
}
